<style lang="scss" scoped>
@import '../../style/mixin-rem.scss';

.book-case-del-action-sheet {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.3);
  .btn-group {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f5f7fa;
    font-size: rem(36px);
    text-align: center;
  }
  .confirm {
    color: #ed434b;
    padding: rem(36px) 0 rem(36px) 0;
    margin-bottom: rem(20px);
    background-color: #fff;
  }
  .cancel {
    color: #cccccc;
    padding: rem(36px) 0 rem(36px) 0;
    background-color: #fff;
  }
}
</style>

<template>
  <div class="book-case-del-action-sheet"
    v-show="isShow"
    @click="delCancel"
    >
    <div class="btn-group">
      <div class="confirm"
        @click.stop="delConfirm"
      >
        确认
      </div>
      <div class="cancel"
        @click.stop="delCancel"
      >
        取消
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'bookCaseDelActionSheet',
  computed: {
    isShow () {
      return this.$store.state.bookCase.delActionSheetIsShow
    }
  },
  methods: {
    delConfirm () {
      this.$store.commit('bookCase/delActionSheetHide')
      this.$store.commit('bookCase/delItem')
    },
    delCancel () {
      this.$store.commit('bookCase/delActionSheetHide')
    }
  }
}
</script>
